package com.youge.dao;

/**
 * @author: hcf
 * @qq: 46914685
 * @email: 46914685@qq.com
 * @date: 2020-09-28 18:30
 */

import com.youge.domain.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 账户dao接口
 */
@Repository
public interface AccountDao {

    //查询所有账户
    @Select("select * from account")
    public List<Account> findAll();

    //保存账户信息
    @Insert("insert into account(name,balance) values(#{name},#{balance})")
    public void saveAccount(Account account);

}
